package com.company.oa.announcement.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName("announcement")
public class Announcement {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    private String title;
    
    private String content;
    
    private Integer type;
    
    private Long publisherId;
    
    private String publisherName;
    
    private Long departmentId;
    
    private String departmentName;
    
    private LocalDateTime publishTime;
    
    private LocalDateTime startTime;
    
    private LocalDateTime endTime;
    
    private Integer isTop;
    
    private LocalDateTime topEndTime;
    
    private Integer status;
    
    private Integer readCount;
    
    private LocalDateTime createTime;
    
    private LocalDateTime updateTime;
    
    private Integer isDeleted;
    
    @TableField(exist = false)
    private List<AnnouncementScope> scopes;
    
    @TableField(exist = false)
    private List<AnnouncementAttachment> attachments;
    
    @TableField(exist = false)
    private Boolean hasRead;
} 